import { defineComponent, ref } from "vue";

export default defineComponent({
  props: {
    defaultDate: {
      type: Date,
      default: new Date(),
    },
  },
  emits: ['cancel', 'confirm'],
  setup(props, { emit }) {
    const currentDate = ref(props.defaultDate);
    return () => (
      <>
        <nut-date-picker v-model={currentDate.value} onCancel={() => { emit('cancel') }} onConfirm={(e:any) => { emit('confirm', e) }}></nut-date-picker>
      </>
    )
  }
})